<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>aaaaaaa啊啊啊啊啊啊啊</h1>
<div>
<table class="" width="100%" border="1" >
         	<thead>
	         	<tr>
	                <th width="25">选择</th>
					<th width="100">地区</th>
                   	<th width="100">icon名称</th>
					<th width="120">icon图标</th>
					<th width="80">打开方式</th>
					<th width="160">链接地址</th>
					<th width="160">操作</th>
               </tr>	             
            </thead>
            <tbody id="J_tabletpl"></tbody>
         </table>
</div>
<div id="companyNm"></div>
<div id="companyAddr"></div>
<button >测试按钮</button>
<script id="T_tabletpl" type="text/x-handlebars-template">
{{#if beans}}
    {{#each beans}}
        <tr>
            <td width="25">{{companyId}}</td>
			<td>{{companyNm}}</td>
			<td>{{companyAddr}}</td>
			<td>{{companyAddr}}</td>
			<td>{{companyAddr}}</td>
            <td><div class="text_over_flow" title={{companyDesc}}</div></td>
            <td>
			</td>
        </tr>
    {{/each}}
{{else}}
	<tr>
		<td colspan="7">
			<div>
				<div>暂无标签！</div>
			</div>
		</td>
	</tr>
{{/if}}
</script>
<script type="text/javascript" src="../lib/handlebars.js"></script>
<!-- <script type="text/javascript" src="../lib/lib.min.js"></script>
<script type="text/javascript" src="../lib/common.min.js"></script> -->
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="../lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript">
	 var G_params = {
		url : '/getCompanyLIst',
		items_per_page : 10, // 每页数     @param : limit   请注意后台接收后按此值处理分页，否则页面会全部展现
		page_index : 0, //当前页  @param : start
		pagination : "Pagination", //分页id
		searchformId : "J_formSearch", //搜索表单的id
		tabletpl : "T_tabletpl", //表格模板
		tablewrap : "J_tabletpl" //表格容器
	}; 
	$(function(){
		var loadPageData = function(){
			$.ajax({
			   type: "GET",
			   url: "/getCompanyLIst",
			   data: "name=John&location=Boston",
			   success: function(msg){
				   console.log(msg);
					//$("#companyNm").html(msg.companyNm);
					//$("#companyAddr").html(msg.companyAddr);
					var source   = $("#T_tabletpl").html();
					var template = Handlebars.compile(source);
					var html = template(msg);
					$("#J_tabletpl").html(html);
			   }
			});
		}
		
		loadPageData();
		//Util.pagination(0, true,G_params, "");
	})
</script>
</body>
</html>